{"openapi":"3.1.0","info":{"title":"PUT /api/v1/businesses/{business_id}/cfo-portal/buckets/{bucket_key}","version":"1.0.0","description":"Update a managerial bucket"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/businesses/{business_id}/cfo-portal/buckets/{bucket_key}":{"put":{"tags":["cfo-portal"],"summary":"Update a managerial bucket","description":"Update a managerial bucket.\n\nBuilt-in buckets accept ``label`` and ``color`` only (display\noverrides). Custom buckets accept any field included in the body.","operationId":"cfo_portal_update_bucket_api_v1_businesses__business_id__cfo_portal_buckets__bucket_key__put","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","title":"Business Id"}},{"name":"bucket_key","in":"path","required":true,"schema":{"type":"string","title":"Bucket Key"}},{"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/CustomBucketUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBucketResponse"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CustomBucketResponse":{"properties":{"id":{"type":"string","title":"Id"},"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"color":{"type":"string","title":"Color"},"classification":{"type":"string","title":"Classification"},"sort_order":{"type":"integer","title":"Sort Order"},"is_active":{"type":"boolean","title":"Is Active"},"is_default":{"type":"boolean","title":"Is Default","description":"True for built-in default buckets","default":false},"can_delete":{"type":"boolean","title":"Can Delete","description":"Whether the bucket can be deleted from Recipe Book. Some built-in buckets are locked.","default":true}},"type":"object","required":["id","key","label","color","classification","sort_order","is_active"],"title":"CustomBucketResponse","description":"A managerial bucket (built-in or custom).\n\nBuilt-in buckets have stable ``key`` values; optional ``label`` /\n``color`` edits come from per-business display overrides."},"CustomBucketUpdateRequest":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Label","description":"Display name for the bucket"},"color":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Color","description":"Color theme: green, orange, indigo, accent, gray"},"classification":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Classification","description":"Bucket classification: operating_revenue, cogs, operating_expense, other_income, other_expense"},"sort_order":{"anyOf":[{"type":"integer","maximum":999.0,"minimum":0.0},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"CustomBucketUpdateRequest","description":"Request payload for updating a custom managerial bucket."},"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":[]}]}