Skip to content
campaiDeveloper
campai.com

Finance · Accounting · Budgets

POST/{organizationId}/{mandateId}/finance/accounting/budgets/{budgetId}/fiscalYear

Update budget fiscal year

It takes organizationId, a nullable mandateId, budgetId, and fiscalYear. Planned amounts stay on the same months of the fiscal year, and the mutation returns no value.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • The caller must have organization access.
  • The caller must have mandate.read permission.
  • The caller must have budget.edit permission.

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • budgetIdidrequired

Body

Content-Type: application/json

  • fiscalYearintegerrequired

    2000–3000

Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/finance/accounting/budgets/YOUR_BUDGET_ID/fiscalYear' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

No response body is specified.

What else happens

  • When the checks pass, the budget's fiscalYear is updated.

Errors

Other errors

StatusErrorWhen
400The budget is approved. Reopen it to change it.If the budget is approved, the endpoint returns 400 BAD_REQUEST with key routes.finance.accounting.budgets.approved.
404Budget was not foundIf the budget is not found, the endpoint returns 404 NOT_FOUND with key routes.finance.accounting.budgets.notFound.
409This mandate already has a budget for this fiscal yearIf another budget for the same mandate already exists in the requested fiscal year, the endpoint returns 409 CONFLICT with key routes.finance.accounting.budgets.alreadyExists.

Errors nearly every request can meet are listed under Errors.