{"openapi":"3.1.0","info":{"title":"GET /api/v1/businesses/{business_id}/cfo-portal/buckets","version":"1.0.0","description":"List all managerial buckets (default + custom)"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/businesses/{business_id}/cfo-portal/buckets":{"get":{"tags":["cfo-portal"],"summary":"List all managerial buckets (default + custom)","description":"Return all managerial buckets available for this business.\n\nThe response includes both the built-in default buckets and any\ncustom buckets defined by this business. Default buckets have\n``is_default: true`` rows are built-in buckets with fixed keys; use\nPUT ``.../buckets/{bucket_key}`` to customize ``label`` and ``color``.","operationId":"cfo_portal_list_buckets_api_v1_businesses__business_id__cfo_portal_buckets_get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","title":"Business Id"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBucketsListResponse"}}}},"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."},"CustomBucketsListResponse":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/CustomBucketResponse"},"type":"array","title":"Buckets"}},"type":"object","required":["buckets"],"title":"CustomBucketsListResponse","description":"Response containing all buckets (default + custom) for a business."},"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":[]}]}