# Update a budget

Updates a budget's top-level configuration. To change members or
owners, use their respective endpoints —
budget members and
budget owners.

Endpoint: PATCH /v1/businesses/{client_id}/budgets/{budget_id}
Version: v1
Security: BearerAuth

## Path parameters:

  - `client_id` (integer, required)
    The ID of the business.
    Example: 123

  - `budget_id` (string, required)
    The ID of the budget.

## Request fields (application/json):

  - `name` (string)
    Example: "Sales Team"

  - `reset_amount` (number)
    Example: 1500

  - `reset_period` (string)
    The reset cadence for the budget. JULY_FINANCIAL_YEAR resets on 1 July;
APRIL_FINANCIAL_YEAR resets on 1 April.
    Enum: "DAILY", "WEEKLY", "FORTNIGHTLY", "MONTHLY", "QUARTERLY", "ANNUALLY", "JULY_FINANCIAL_YEAR", "APRIL_FINANCIAL_YEAR", "NEVER"

  - `has_member_limits` (boolean)
    Example: true

  - `rollover_funds` (boolean)
    Example: true

  - `limit_categories` (boolean)
    Example: true

  - `categories` (array)

  - `custom_fields` (array)

  - `custom_fields.id` (string, required)
    The id of the custom field.
    Example: "a2b1d8c0-9a4e-4b8a-bf24-90af44a98e2f"

  - `custom_fields.allow_options` (array)
    List item ids that should remain selectable on this budget.

## Response 200 fields (application/json):

  - `id` (string, required)
    The ID of the budget.
    Example: "e33b7c61-5124-4ba0-b238-e4c573133715"

  - `name` (string, required)
    The name of the budget.
    Example: "Sales Team"

  - `budget_type` (string, required)
    The type of budget.
    Enum: "BUDGET", "SUBSCRIPTION"

  - `available_amount` (number, required)
    The available amount of the budget.
    Example: 800

  - `spent_amount` (number, required)
    The amount of the budget that has been spent.
    Example: 200

  - `reset_amount` (number, required)
    The reset amount of the budget.
    Example: 1000

  - `reset_period` (string, required)
    The reset cadence for the budget. JULY_FINANCIAL_YEAR resets on 1 July;
APRIL_FINANCIAL_YEAR resets on 1 April.
    Enum: same as `reset_period` (9 values)

  - `current_period_start` (string,null, required)
    The start date of the current period in UTC.
    Example: "2024-01-01T00:00:00Z"

  - `current_period_end` (string,null, required)
    The end date of the current period in UTC.
    Example: "2024-01-31T23:59:59Z"

  - `has_member_limits` (boolean, required)
    Whether the budget has member limits.

  - `rollover_funds` (boolean, required)
    When true, unspent balance rolls over to the next period instead of resetting.

  - `limit_categories` (boolean, required)
    When true, only categories listed in categories are visible on
the budget. When false, all enabled business categories are visible.

  - `categories` (array, required)
    Categories currently visible on the budget. Returns an empty array
when limit_categories is false (no restriction in force).

  - `categories.id` (string, required)
    Example: "7f183748-c7fb-428a-9b2a-603a03dcabdb"

  - `categories.name` (string, required)
    Example: "Travel"

  - `custom_fields` (array, required)
    Custom fields attached to this budget.

  - `custom_fields.id` (string, required)
    The id of the custom field.
    Example: "44b2add5-eeb2-456c-8918-9bb362b0e896"

  - `custom_fields.name` (string, required)
    Example: "Department"

  - `custom_fields.allow_options` (array,null, required)
    For LIST-type custom fields, the list-item ids selectable on
this budget. null means no per-budget restriction (all
enabled options are selectable). An empty array means no
options are selectable on this budget. Always null for
FREE_TEXT custom fields.

  - `is_deleted` (boolean, required)
    Whether the budget is deleted.

  - `created` (string, required)
    The date and time when the budget was created in UTC.
    Example: "2024-01-01T00:00:00Z"

  - `updated` (string, required)
    The date and time when the budget was last updated in UTC.
    Example: "2024-01-01T00:00:00Z"


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 404 fields
