Budget

List the fund movements of a budget

The budget's funds history: who moved its funds in or out, how much, from or to where and why. Newest first (created_at desc, then id desc). Closed budgets still return their history.

Access

  • Admin / budgets_manage users and Cardda staff.
  • Members of the budget: its manager ("Encargado"), a co-manager or a participant, explicit or by holding one of its non-canceled cards.

Someone who sees the budget only because it's open to the company (access: company) gets 401. A budget outside the caller's scope returns 404 Not Found.

Pagination

_start/_end paginate (25 rows by default), with Content-Range and X-Total-Count in the response. There is no _field/_order sorting.

What it holds

The history starts when this endpoint was released; older movements are not backfilled. Assigning or unassigning loaded prepaid cards, period renewals and the budget's creation are not recorded, so the rows don't add up to allocated_amount_cents.

get/v1/budgets/{id}/fund_movements

Request

  • Base URL
    https://api.cardda.com
  • URL
    https://api.cardda.com/v1/budgets/{id}/fund_movements
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

The UUID of the balance group (budget).

Parameters

#/paths/~1v1~1bills/get/parameters/0 (unresolved $ref)
#/paths/~1v1~1bills/get/parameters/1 (unresolved $ref)
#/paths/~1v1~1bills/get/parameters/2 (unresolved $ref)

Response

The budget's fund movements, newest first.

idstring uuid required
created_atstring date-time required
kind'top_up' | 'withdraw' | 'transfer' | 'amount_edit' required
  • top_up: from the company's general balance into the budget.
  • withdraw: from the budget back to the general balance.
  • transfer: between two budgets. It is a single movement that appears in both budgets' history, with opposite direction.
  • amount_edit: an edit of a tracking ("Solo control") budget's planned amount; amount_cents is the difference.
direction'in' | 'out' required

Whether the funds came into or went out of the budget queried.

amount_centsinteger required

Always greater than 0; direction gives the sign.

reasonstring nullable required

Why it was made. null only for an amount_edit without a reason. When from_request is true, it is the requester's text.

from_requestboolean required

The movement came from approving a budget request (/v1/budget_requests). Then reason is the requester's text and author is who approved it.

Example response

[
  {
    "kind": "top_up",
    "direction": "in",
    "amount_cents": 500000,
    "counterpart": {
      "name": "Marketing"
    },
    "reason": "Evento de fin de año",
    "author": {
      "id": "1234",
      "name": "María Pérez"
    }
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.