{"openapi":"3.1.0","info":{"title":"POST /api/v1/billing/firm/change-tier","version":"1.0.0","description":"Change Firm Tier"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/billing/firm/change-tier":{"post":{"tags":["billing"],"summary":"Change Firm Tier","description":"Upgrade or downgrade the firm's plan tier, in-app.\n\nSwaps the per-client price, adds/removes the platform fee, and re-applies\nthe current client quantity in one prorated Stripe update. Requires the\ncaller to be an owner/admin of the firm. Blocks a downgrade that would drop\nthe firm below its current client count.","operationId":"change_firm_tier_api_v1_billing_firm_change_tier_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmTierChangeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"FirmTierChangeRequest":{"properties":{"firm_plan_tier":{"type":"string","title":"Firm Plan Tier","description":"Target firm tier: 'firm_starter', 'firm_professional', or 'firm_enterprise'."}},"type":"object","required":["firm_plan_tier"],"title":"FirmTierChangeRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}