Create budget

Params

Param name Description
budget
required

Budget parameters.

Validations:

  • Must be a Hash

budget[name]
required

Budget name.

Validations:

  • Must be a String

budget[description]
optional

Budget description. Maximum length: 1500 characters.

Validations:

  • Must be a String

budget[start_date]
required

Budget’s start date, e.g. 2024-12-01. Must be in the future. Cannot overlap with existing budgets with the same user & expense account combination.

Validations:

  • Must be a String

budget[end_date]
required

Budget’s end date, e.g. 2024-12-31. Must be in the future. Cannot overlap with existing budgets with the same user & expense account combination.

Validations:

  • Must be a String

budget[cost_center_ids]
optional

Cost center IDs. No more than one cost center ID per dimension.

Validations:

  • Must be an array of Integer

budget[user_id]
optional

User ID. Current user ID by default. Only managers can create budgets on behalf of other users.

Validations:

  • Must be a Integer

budget[approver_id]
optional

ID of user who is to approve the budget. By default, user’s first approver will be used. If there is no approval cycle behind the user, company’s default approver will be used.

Validations:

  • Must be a Integer

budget[lines_attributes]
required

Budget lines’ parameters. At least one line must be present.

Validations:

  • Must be an Array of nested elements

budget[lines_attributes][amount]
required

Line amount as a decimal number, e.g. “123.55”.

Validations:

  • Must be a String

budget[lines_attributes][amount_currency]
optional

Amount currency, e.g. “EUR”. Set to company currency by default.

Validations:

  • Must be a String

budget[lines_attributes][expense_account_id]
required

Expense account (aka purchase type) for the budget line.

Validations:

  • Must be a Integer