{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/{code}":{"get":{"summary":"Redirect Short","description":"Main redirect endpoint. Immediately returns 302 and schedules analytics work.","operationId":"redirect_short__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v/{code}":{"get":{"summary":"View Short Content","description":"Hosted payload endpoint for non-direct redirect QR content types.","operationId":"view_short_content_v__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/qrimage":{"post":{"summary":"Create Image","description":"Create a new QR code image - POST endpoint with authentication and credit check","operationId":"create_image_qrimage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/images":{"get":{"summary":"List User Images","description":"Return up to 20 images for the authenticated user with per-image scan totals.","operationId":"list_user_images_api_v1_images_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/images/{qr_code_id}/analytics":{"get":{"summary":"Get Image Analytics","description":"Return detailed analytics for one user-owned image.","operationId":"get_image_analytics_api_v1_images__qr_code_id__analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"qr_code_id","in":"path","required":true,"schema":{"type":"string","title":"Qr Code Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard":{"get":{"summary":"Get Dashboard Analytics","description":"Return dashboard analytics aggregated across all user images.","operationId":"get_dashboard_analytics_api_v1_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dashboard/enhanced-analytics":{"get":{"summary":"Get Enhanced Dashboard Analytics","description":"Return enhanced dashboard analytics aggregated across all user images.","operationId":"get_enhanced_dashboard_analytics_api_v1_dashboard_enhanced_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dashboard/analytics/export/options":{"get":{"summary":"Get Analytics Export Options","description":"Return export ranges and which ones the user's plan allows (for locked/upgrade UI states).","operationId":"get_analytics_export_options_api_v1_dashboard_analytics_export_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dashboard/analytics/export":{"get":{"summary":"Export Dashboard Analytics","description":"Download scan analytics for a rolling window as an .xlsx workbook.","operationId":"export_dashboard_analytics_api_v1_dashboard_analytics_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"range","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AnalyticsExportRange"}},{"name":"qr_code_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Qr Code Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/images/{qr_code_id}":{"put":{"summary":"Update Image Content","description":"Update QR destination content for one active QR image owned by the authenticated user.","operationId":"update_image_content_api_v1_images__qr_code_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"qr_code_id","in":"path","required":true,"schema":{"type":"string","title":"Qr Code Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageContentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/image/{user_id}/{qr_code_id}.png":{"get":{"summary":"Serve User Image","description":"Serve raw PNG bytes for one user-owned image from the private bucket.","operationId":"serve_user_image_image__user_id___qr_code_id__png_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"qr_code_id","in":"path","required":true,"schema":{"type":"string","title":"Qr Code Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/create-checkout-session":{"post":{"tags":["billing"],"summary":"Create Checkout Session","operationId":"create_checkout_session_billing_create_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/subscription":{"get":{"tags":["billing"],"summary":"Get Subscription","operationId":"get_subscription_billing_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/portal":{"post":{"tags":["billing"],"summary":"Create Customer Portal","operationId":"create_customer_portal_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPortalResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/webhook":{"post":{"tags":["billing"],"summary":"Billing Webhook","operationId":"billing_webhook_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/contact":{"post":{"tags":["contact"],"summary":"Submit Contact Support","operationId":"submit_contact_support_api_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/":{"get":{"summary":"Read Root","operationId":"read_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/me":{"get":{"summary":"Read Users Me","operationId":"read_users_me_api_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"AnalyticsExportRange":{"type":"string","enum":["1m","3m","6m","1y"],"title":"AnalyticsExportRange"},"ContactRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"subject":{"type":"string","maxLength":200,"title":"Subject"},"message":{"type":"string","maxLength":5000,"title":"Message"},"turnstileToken":{"type":"string","maxLength":4096,"title":"Turnstiletoken"}},"type":"object","required":["subject","message","turnstileToken"],"title":"ContactRequest"},"ContactSuccessResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"type":"string","title":"Message","default":"Your support request has been submitted successfully."}},"type":"object","title":"ContactSuccessResponse"},"CreateCheckoutSessionRequest":{"properties":{"plan":{"type":"string","enum":["starter_monthly","starter_annual","pro_monthly","pro_annual"],"title":"Plan"}},"type":"object","required":["plan"],"title":"CreateCheckoutSessionRequest"},"CreateCheckoutSessionResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CreateCheckoutSessionResponse"},"CustomerPortalResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CustomerPortalResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageContentUpdate":{"properties":{"content_type":{"type":"string","title":"Content Type"},"content":{"additionalProperties":true,"type":"object","title":"Content"}},"type":"object","required":["content_type"],"title":"ImageContentUpdate"},"ImageCreate":{"properties":{"image_prompt":{"type":"string","title":"Image Prompt"},"image_long_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Long Url"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"qr_error_correction":{"type":"string","title":"Qr Error Correction","default":"Medium"}},"type":"object","required":["image_prompt"],"title":"ImageCreate"},"SubscriptionResponse":{"properties":{"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"billing_cycle":{"anyOf":[{"type":"string","enum":["monthly","annual"]},{"type":"null"}],"title":"Billing Cycle"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"current_period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"credits_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Remaining"},"credits_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Limit"},"credits_used_this_period":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Used This Period"},"next_credit_reset_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Credit Reset At"},"days_until_credit_reset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Until Credit Reset"},"next_renewal_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Renewal Date"},"days_until_renewal":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Until Renewal"},"next_renewal_amount_credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Renewal Amount Credits"},"last_payment_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Payment Amount"},"last_payment_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Payment Currency"},"last_payment_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Payment At"},"payment_method_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method Brand"},"payment_method_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method Last4"},"payment_method_display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method Display"},"dodo_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dodo Customer Id"}},"type":"object","title":"SubscriptionResponse"},"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"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}