Skip to content
campaiDeveloper
campai.com

Finance · Accounting · Budgets

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

Update budget status

Updates a budget's status to approve or reopen it. It takes an organization ID, a nullable mandate ID, a budget ID and a status. It returns no content; if the status is unchanged, it makes no update.

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 needs mandate.read permission.
  • The caller needs budget.edit permission.

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • budgetIdidrequired

Body

Content-Type: application/json

  • statusstringrequired
    draft approved
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/status' \
  --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

  • If the requested status differs from the current status, the budget is updated.
  • When the requested status is approved, the update records the approval time and actor in approvedAt and approvedBy.
  • For other requested statuses, the update clears approvedAt and approvedBy.

Errors

Other errors

StatusErrorWhen
404Budget was not foundIf the budget is not found for the organization and mandate, the endpoint returns HTTP 404 with key routes.finance.accounting.budgets.notFound.

Errors nearly every request can meet are listed under Errors.