Skip to main content
UniFit
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
MethodEndpoint PathAuth RequirementDescription
POST/api/v1/brands/onboardUser JWT / OnboardingRegister a merchant workspace, configure default region/currency, and start a 7-day evaluation trial.
POST/api/v1/productsServer API KeyCreate or upsert apparel products with category taxonomy, fit intent, and fabric elasticity tags.
POST/api/v1/products/:id/variantsServer API KeySync purchasable SKU sizes, colorways, regional label systems, and inventory status.
POST/api/v1/brands/:brandId/size-chartsServer API Key / PortalUpload canonical centimetre garment measurement tables across chest, waist, hip, shoulder, and inseam.
POST/api/v1/consents/tokenPKCE Authorization CodeExchange a shopper-approved OAuth 2.0 + PKCE code for a short-lived 15-minute scoped grant.
POST/api/v1/recommendationsServer Key + Grant TokenReturn recommended size, alternative size, fit match label, confidence score, and zone ease telemetry.
POST/api/v1/recommendations/:id/feedbackServer Key / Customer SessionSubmit post-try-on or post-purchase fit feedback to calibrate garment ease accuracy.
GET/api/openapi.jsonPublicDownload 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

StatusMeaningHandling
200 / 201SuccessProceed with size recommendation payload or synced resource.
400Validation ErrorVerify missing chest/waist size chart ranges or request body schema.
401UnauthorizedConfirm active API key header or unexpired 15-minute PKCE shopper grant.
402Quota / Trial Ended7-day evaluation quota reached; activate Monthly + Pay-Per-Use tier in Billing.
403Scope / Origin MismatchVerify storefront CORS origin allowlist or scoped consent permissions.
429Rate Limit ExceededRespect Retry-After and X-RateLimit-Remaining headers (30–1,200 req/min by tier).