{"openapi":"3.1.0","info":{"title":"Mirrably API","description":"Backend API for the Mirrably virtual try-on platform. Serves product catalog, 3-D model URLs, and variant data.","version":"0.1.0"},"paths":{"/v1/health":{"get":{"tags":["Health"],"summary":"Health","description":"Return service liveness status.","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/health/cors":{"get":{"tags":["Health"],"summary":"Cors Health","description":"Return non-secret effective CORS diagnostics for deployment drift checks.","operationId":"cors_health_v1_health_cors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorsHealthResponse"}}}}}}},"/v1/stores/{store_id}/catalog":{"get":{"tags":["Catalog"],"summary":"List active products for a store (paginated)","description":"Return a paginated slice of the active product catalog for *store_id*.\n\nThe caller must present a valid `X-API-Key` header.  The key must belong\nto *store_id* — cross-tenant access is rejected with HTTP 403.\n\nPagination parameters:\n- **limit**: number of products per page (1-100, default 20)\n- **offset**: zero-based starting index (default 0)\n\nResponse includes `total`, `limit`, `offset`, and `hasMore` for clients\nto implement cursor-style or page-number navigation.","operationId":"get_catalog_v1_stores__store_id__catalog_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max products to return","default":20,"title":"Limit"},"description":"Max products to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of products to skip","default":0,"title":"Offset"},"description":"Number of products to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCatalogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}":{"get":{"tags":["Products"],"summary":"Fetch a single product by ID","description":"Return full product details including all variants.","operationId":"get_product_v1_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/products/{product_id}/model-url":{"get":{"tags":["Products"],"summary":"Resolve the 3-D model URL for a product (widget compat path)","description":"Widget-compatible alias.  The widget's RestDataProvider calls\n`GET /products/{id}/model-url` — this endpoint satisfies that contract.\nReturns `{\"modelUrl\": \"...\"}` shape expected by the widget.","operationId":"get_product_model_url_v1_products__product_id__model_url_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models/{product_id}/url":{"get":{"tags":["Models"],"summary":"Get the GLB model URL for a product","description":"Return the hosted GLB/GLTF URL for *product_id*.\n\nBoth this path and `GET /products/{id}/model-url` return the same data;\nthis path follows the spec while the other satisfies the widget's\nRestDataProvider implementation.","operationId":"get_model_url_v1_models__product_id__url_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/variants/{product_id}":{"get":{"tags":["Variants"],"summary":"List all colour/finish variants for a product","description":"Return all Variant records for *product_id*, ordered by sort_order.","operationId":"get_variants_v1_variants__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assets/{token}":{"get":{"tags":["Assets"],"summary":"Download a signed asset (3D model or thumbnail)","description":"Validate an HMAC-signed asset token and stream the corresponding file.\n\nTokens are generated by ``sign_asset_url()`` in ``app.signing`` and are\nembedded in ``ProductOut.modelUrl`` / ``ProductOut.thumbnailUrl`` when the\ncatalog is serialised.\n\nError responses:\n- **403** — token signature is invalid or the token has expired.\n- **404** — the signed path does not exist on disk.","operationId":"get_asset_v1_assets__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stores/register":{"post":{"tags":["Registration"],"summary":"Self-service store registration","operationId":"register_store_v1_stores_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreRegistrationRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Create a Stripe Checkout Session","description":"Create a Stripe Checkout Session and return the redirect URL.\n\nThe store must use its own API key (X-API-Key). The `store_id` in the\nrequest body must match the authenticated store — no cross-tenant checkout.","operationId":"create_checkout_session_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Checkout Session V1 Billing Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/webhook":{"post":{"tags":["Billing"],"summary":"Handle Stripe webhook events","description":"Verify and process Stripe webhook events.\n\nHandles:\n- ``checkout.session.completed`` — upgrade store tier\n- ``customer.subscription.deleted`` — downgrade store to free","operationId":"stripe_webhook_v1_billing_webhook_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stripe Webhook V1 Billing Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/status":{"get":{"tags":["Billing"],"summary":"Get subscription status","description":"Return the current billing tier and subscription info for the authenticated store.","operationId":"billing_status_v1_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}}}}},"/health":{"get":{"tags":["Compat"],"summary":" Compat Health","operationId":"_compat_health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/stores/{store_id}/catalog":{"get":{"tags":["Compat"],"summary":" Compat Catalog","operationId":"_compat_catalog_stores__store_id__catalog_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stores/{store_id}/products/{product_id}/variants":{"get":{"tags":["Compat"],"summary":" Compat Store Product Variants","operationId":"_compat_store_product_variants_stores__store_id__products__product_id__variants_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stores/{store_id}/products/{product_id}/model-url":{"get":{"tags":["Compat"],"summary":" Compat Store Product Model Url","operationId":"_compat_store_product_model_url_stores__store_id__products__product_id__model_url_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stores/{store_id}/products/{product_id}":{"get":{"tags":["Compat"],"summary":" Compat Store Product","operationId":"_compat_store_product_stores__store_id__products__product_id__get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stores/{store_id}/products":{"get":{"tags":["Compat"],"summary":" Compat Store Products","operationId":"_compat_store_products_stores__store_id__products_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/products/{product_id}/model-url":{"get":{"tags":["Compat"],"summary":" Compat Product Model Url","operationId":"_compat_product_model_url_products__product_id__model_url_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/products/{product_id}":{"get":{"tags":["Compat"],"summary":" Compat Product","operationId":"_compat_product_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/{product_id}/url":{"get":{"tags":["Compat"],"summary":" Compat Model Url","operationId":"_compat_model_url_models__product_id__url_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/{product_id}":{"get":{"tags":["Compat"],"summary":" Compat Variants","operationId":"_compat_variants_variants__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/{token}":{"get":{"tags":["Compat"],"summary":" Compat Assets","operationId":"_compat_assets_assets__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forge-tryon/v1/{path}":{"options":{"tags":["ForgeTryon-Compat"],"summary":" Compat Forge Tryon V1","operationId":"_compat_forge_tryon_v1_forge_tryon_v1__path__options","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ForgeTryon-Compat"],"summary":" Compat Forge Tryon V1","operationId":"_compat_forge_tryon_v1_forge_tryon_v1__path__options","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["ForgeTryon-Compat"],"summary":" Compat Forge Tryon V1","operationId":"_compat_forge_tryon_v1_forge_tryon_v1__path__options","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["ForgeTryon-Compat"],"summary":" Compat Forge Tryon V1","operationId":"_compat_forge_tryon_v1_forge_tryon_v1__path__options","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["ForgeTryon-Compat"],"summary":" Compat Forge Tryon V1","operationId":"_compat_forge_tryon_v1_forge_tryon_v1__path__options","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["ForgeTryon-Compat"],"summary":" Compat Forge Tryon V1","operationId":"_compat_forge_tryon_v1_forge_tryon_v1__path__options","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["ForgeTryon-Compat"],"summary":" Compat Forge Tryon V1","operationId":"_compat_forge_tryon_v1_forge_tryon_v1__path__options","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/stores":{"post":{"tags":["Admin"],"summary":"Create a new store","description":"Create a new store with a unique domain. Generates and returns a plain-text\nAPI key once — it is hashed before storage and cannot be retrieved again.","operationId":"create_store_admin_stores_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStoreRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"List all stores (paginated)","description":"Return all stores ordered by creation time (paginated).","operationId":"list_stores_admin_stores_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max stores to return","default":20,"title":"Limit"},"description":"Max stores to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of stores to skip","default":0,"title":"Offset"},"description":"Number of stores to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedStoresResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/stores/{store_id}":{"put":{"tags":["Admin"],"summary":"Update store name and domain","description":"Update store metadata. Domain must remain unique across stores.","operationId":"update_store_admin_stores__store_id__put","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete a store and all its products/variants","description":"Delete the store identified by *store_id*. Cascades to all products and\nvariants (enforced by the ORM relationship cascade and FK ON DELETE CASCADE).","operationId":"delete_store_admin_stores__store_id__delete","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/stores/{store_id}/products":{"get":{"tags":["Admin"],"summary":"List products for a store (admin view with all fields)","description":"List all products in a store with admin-level detail.","operationId":"list_products_admin_stores__store_id__products_get","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Products Admin Stores  Store Id  Products Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create a product inside a store","description":"Add a new product to *store_id*. Returns the created product.","operationId":"create_product_admin_stores__store_id__products_post","parameters":[{"name":"store_id","in":"path","required":true,"schema":{"type":"string","title":"Store Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProductOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/products/{product_id}":{"put":{"tags":["Admin"],"summary":"Update a product","description":"Update non-null fields on a product. Omit a field to leave it unchanged.","operationId":"update_product_admin_products__product_id__put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProductOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete a product and its variants","description":"Delete the product and all its variants (cascade).","operationId":"delete_product_admin_products__product_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/products/{product_id}/toggle":{"patch":{"tags":["Admin"],"summary":"Toggle a product active/inactive","description":"Flip the `active` flag on a product. Returns the updated product.","operationId":"toggle_product_admin_products__product_id__toggle_patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProductOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/products/{product_id}/variants":{"get":{"tags":["Admin"],"summary":"List variants for a product","description":"Return all variants belonging to *product_id*.","operationId":"list_variants_admin_products__product_id__variants_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Variants Admin Products  Product Id  Variants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create a variant for a product","description":"Add a new variant to *product_id*.","operationId":"create_variant_admin_products__product_id__variants_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVariantRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminVariantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/variants/{variant_id}":{"put":{"tags":["Admin"],"summary":"Update a variant","description":"Update non-null fields on a variant. Omit a field to leave it unchanged.","operationId":"update_variant_admin_variants__variant_id__put","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVariantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminVariantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete a variant","description":"Delete the variant identified by *variant_id*.","operationId":"delete_variant_admin_variants__variant_id__delete","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/products/{product_id}/variants/reorder":{"put":{"tags":["Admin"],"summary":"Reorder variants for a product","description":"Accept an ordered list of variant IDs for *product_id* and update each\nvariant's `sort_order` to match its position in the list (0-indexed).\n\nAll provided IDs must belong to *product_id*. Any IDs not in the list\nare left unchanged.","operationId":"reorder_variants_admin_products__product_id__variants_reorder_put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderVariantsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminVariantOut"},"title":"Response Reorder Variants Admin Products  Product Id  Variants Reorder Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/products/{product_id}/upload-model":{"post":{"tags":["Admin"],"summary":"Upload a GLB/glTF 3-D model and attach it to a product","description":"Upload a `.glb` or `.gltf` 3-D model file for *product_id*.\n\nConstraints:\n- Extension must be `.glb` or `.gltf` (case-insensitive).\n- File size must not exceed `MAX_UPLOAD_SIZE_MB` (default 50 MB).\n\nOn success the product's `model_url` is updated to the served path\n`/uploads/models/{product_id}_{uuid}.glb` and the updated product is\nreturned.","operationId":"upload_model_admin_products__product_id__upload_model_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_model_admin_products__product_id__upload_model_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProductOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/products/{product_id}/upload-thumbnail":{"post":{"tags":["Admin"],"summary":"Upload a thumbnail image and attach it to a product","description":"Upload a `.jpg`, `.png`, or `.webp` thumbnail for *product_id*.\n\nConstraints:\n- Extension must be `.jpg`, `.jpeg`, `.png`, or `.webp` (case-insensitive).\n- File size must not exceed `MAX_THUMBNAIL_SIZE_MB` (default 5 MB).\n\nOn success the product's `thumbnail_url` is updated to the served path\n`/uploads/thumbnails/{product_id}_{uuid}.{ext}` and the updated product\nis returned.","operationId":"upload_thumbnail_admin_products__product_id__upload_thumbnail_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_thumbnail_admin_products__product_id__upload_thumbnail_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProductOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/products/{product_id}/mesh-names":{"get":{"tags":["Admin"],"summary":"Extract mesh and node names from a product's GLB model","description":"Parse the product's uploaded GLB model and return all mesh and node names.\n\nUseful for building material_overrides mappings — the caller can discover\nwhich mesh names are valid targets for texture slots.\n\nReturns ``{\"mesh_names\": [...], \"node_names\": [...]}`` on success.\nIf the model is not a local upload or the file is missing, empty arrays\nare returned rather than an error.","operationId":"get_mesh_names_admin_products__product_id__mesh_names_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Mesh Names Admin Products  Product Id  Mesh Names Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/variants/{variant_id}/upload-texture":{"post":{"tags":["Admin"],"summary":"Upload a texture image and attach it to a material slot on a variant","description":"Upload a texture image for a specific mesh/slot combination on a variant.\n\nThe variant's ``material_overrides`` JSON is updated automatically:\n``overrides[mesh_name][\"textures\"][slot]`` is set to the uploaded file path.\n\nThe file is saved to:\n``{texture_upload_dir}/{product_id}/{variant_id}/{mesh_name}_{slot}.{ext}``","operationId":"upload_texture_admin_variants__variant_id__upload_texture_post","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}},{"name":"mesh_name","in":"query","required":true,"schema":{"type":"string","description":"Mesh name the texture targets (e.g. 'frame_front')","title":"Mesh Name"},"description":"Mesh name the texture targets (e.g. 'frame_front')"},{"name":"slot","in":"query","required":true,"schema":{"type":"string","description":"Material slot: color | normal | bump | metalness | roughness | alpha | ao | emissive","title":"Slot"},"description":"Material slot: color | normal | bump | metalness | roughness | alpha | ao | emissive"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_texture_admin_variants__variant_id__upload_texture_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminVariantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/variants/{variant_id}/upload-thumbnail":{"post":{"tags":["Admin"],"summary":"Upload a thumbnail image for a variant","description":"Upload a thumbnail image for a variant.\n\nThe file is saved to:\n``{thumbnail_upload_dir}/variants/{variant_id}_{uuid}.{ext}``\n\nThe variant's ``thumbnail_url`` field is updated and the updated variant\nis returned.","operationId":"upload_variant_thumbnail_admin_variants__variant_id__upload_thumbnail_post","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_variant_thumbnail_admin_variants__variant_id__upload_thumbnail_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminVariantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdminProductOut":{"properties":{"id":{"type":"string","title":"Id"},"store_id":{"type":"string","title":"Store Id"},"name":{"type":"string","title":"Name"},"sku":{"type":"string","title":"Sku"},"model_url":{"type":"string","title":"Model Url"},"thumbnail_url":{"type":"string","title":"Thumbnail Url"},"active":{"type":"boolean","title":"Active"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style"},"frame_shape":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frame Shape"},"price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price"},"position_x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position X"},"position_y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Y"},"position_z":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Z"},"scale":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scale"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","store_id","name","sku","model_url","thumbnail_url","active","created_at","updated_at"],"title":"AdminProductOut"},"AdminVariantOut":{"properties":{"id":{"type":"string","title":"Id"},"product_id":{"type":"string","title":"Product Id"},"name":{"type":"string","title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"texture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Texture Url"},"sort_order":{"type":"integer","title":"Sort Order"},"material_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Material Overrides"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["id","product_id","name","sort_order"],"title":"AdminVariantOut"},"BillingStatusResponse":{"properties":{"store_id":{"type":"string","title":"Store Id"},"tier":{"type":"string","title":"Tier"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"},"trial_ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trial Ends At"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","required":["store_id","tier","stripe_customer_id","stripe_subscription_id","trial_ends_at","cancel_url"],"title":"BillingStatusResponse"},"Body_upload_model_admin_products__product_id__upload_model_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_model_admin_products__product_id__upload_model_post"},"Body_upload_texture_admin_variants__variant_id__upload_texture_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_texture_admin_variants__variant_id__upload_texture_post"},"Body_upload_thumbnail_admin_products__product_id__upload_thumbnail_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_thumbnail_admin_products__product_id__upload_thumbnail_post"},"Body_upload_variant_thumbnail_admin_variants__variant_id__upload_thumbnail_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_variant_thumbnail_admin_variants__variant_id__upload_thumbnail_post"},"CheckoutRequest":{"properties":{"tier":{"type":"string","title":"Tier"},"store_id":{"type":"string","title":"Store Id"},"success_url":{"type":"string","title":"Success Url","default":"https://mirrably.com/dashboard?session_id={CHECKOUT_SESSION_ID}"},"cancel_url":{"type":"string","title":"Cancel Url","default":"https://mirrably.com/pricing"}},"type":"object","required":["tier","store_id"],"title":"CheckoutRequest"},"CorsHealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"allowOrigins":{"items":{"type":"string"},"type":"array","title":"Alloworigins"},"allowOriginRegexPresent":{"type":"boolean","title":"Alloworiginregexpresent"},"allowOriginRegexHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alloworiginregexhash"},"checks":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Checks"}},"type":"object","required":["status","version","allowOrigins","allowOriginRegexPresent","allowOriginRegexHash","checks"],"title":"CorsHealthResponse"},"CreateProductRequest":{"properties":{"name":{"type":"string","title":"Name"},"sku":{"type":"string","title":"Sku"},"model_url":{"type":"string","title":"Model Url"},"thumbnail_url":{"type":"string","title":"Thumbnail Url","default":""},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style"},"frame_shape":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frame Shape"},"price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price"}},"type":"object","required":["name","sku","model_url"],"title":"CreateProductRequest"},"CreateStoreRequest":{"properties":{"name":{"type":"string","title":"Name"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["name","domain"],"title":"CreateStoreRequest"},"CreateStoreResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"domain":{"type":"string","title":"Domain"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["id","name","domain","api_key"],"title":"CreateStoreResponse"},"CreateVariantRequest":{"properties":{"name":{"type":"string","title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"texture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Texture Url"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"material_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Material Overrides"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["name"],"title":"CreateVariantRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"}},"type":"object","required":["status","version"],"title":"HealthResponse"},"ModelUrlResponse":{"properties":{"url":{"type":"string","title":"Url"},"modelUrl":{"type":"string","title":"Modelurl","default":""}},"type":"object","required":["url"],"title":"ModelUrlResponse"},"PaginatedCatalogResponse":{"properties":{"products":{"items":{"$ref":"#/components/schemas/ProductOut"},"type":"array","title":"Products"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"hasMore":{"type":"boolean","title":"Hasmore"}},"type":"object","required":["products","total","limit","offset","hasMore"],"title":"PaginatedCatalogResponse"},"PaginatedStoresResponse":{"properties":{"stores":{"items":{"$ref":"#/components/schemas/StoreOut"},"type":"array","title":"Stores"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"hasMore":{"type":"boolean","title":"Hasmore"}},"type":"object","required":["stores","total","limit","offset","hasMore"],"title":"PaginatedStoresResponse"},"ProductOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"modelUrl":{"type":"string","title":"Modelurl"},"thumbnailUrl":{"type":"string","title":"Thumbnailurl"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style"},"frameShape":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frameshape"},"price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price"},"positionOffset":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Positionoffset"},"scale":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scale"},"variants":{"items":{"$ref":"#/components/schemas/VariantOut"},"type":"array","title":"Variants"}},"type":"object","required":["id","name","modelUrl","thumbnailUrl"],"title":"ProductOut"},"ReorderVariantsRequest":{"properties":{"variant_ids":{"items":{"type":"string"},"type":"array","title":"Variant Ids"}},"type":"object","required":["variant_ids"],"title":"ReorderVariantsRequest"},"StoreOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"domain":{"type":"string","title":"Domain"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","domain","created_at"],"title":"StoreOut"},"StoreRegistrationRequest":{"properties":{"store_name":{"type":"string","title":"Store Name"},"contact_email":{"type":"string","title":"Contact Email"},"platform":{"type":"string","title":"Platform"}},"type":"object","required":["store_name","contact_email","platform"],"title":"StoreRegistrationRequest"},"StoreRegistrationResponse":{"properties":{"store_id":{"type":"string","title":"Store Id"},"api_key":{"type":"string","title":"Api Key"},"message":{"type":"string","title":"Message"}},"type":"object","required":["store_id","api_key","message"],"title":"StoreRegistrationResponse"},"UpdateProductRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"model_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style"},"frame_shape":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frame Shape"},"price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price"},"position_x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position X"},"position_y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Y"},"position_z":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position Z"},"scale":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scale"}},"type":"object","title":"UpdateProductRequest"},"UpdateStoreRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"domain":{"type":"string","maxLength":255,"minLength":1,"title":"Domain"}},"type":"object","required":["name","domain"],"title":"UpdateStoreRequest"},"UpdateVariantRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"texture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Texture Url"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"material_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Material Overrides"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","title":"UpdateVariantRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VariantOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"textureUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Textureurl"},"materialOverrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Materialoverrides"},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnailurl"}},"type":"object","required":["id","name"],"title":"VariantOut"},"VariantsResponse":{"properties":{"variants":{"items":{"$ref":"#/components/schemas/VariantOut"},"type":"array","title":"Variants"}},"type":"object","required":["variants"],"title":"VariantsResponse"}}}}