Budgets

This API endpoint can be used to manage your budgets. To set the amount of a budget, in a specific period, use the budget limit end point.

List

GET /api/v1/budgets

Returns a list of the users budgets.

Example return

{
 "data": [
     {
         "type": "budgets",
         "id": "2",
         "attributes": {
             "updated_at": "2018-07-07T16:07:59+02:00",
             "created_at": "2018-07-07T16:07:59+02:00",
             "active": true,
             "name": "Bills"
         },
         "links": {
             "0": {
                 "rel": "self",
                 "uri": "/budgets/2"
             },
             "self": "https://demo.firefly-iii.org/api/v1/budgets/2"
         }
     }
 ],
 "included": [],
 "meta": {
     "pagination": {
         "total": 2,
         "count": 2,
         "per_page": 50,
         "current_page": 1,
         "total_pages": 1
     }
 },
 "links": {
     "self": "https://demo.firefly-iii.org/api/v1/budgets?&page=1",
     "first": "https://demo.firefly-iii.org/api/v1/budgets?&page=1",
     "last": "https://demo.firefly-iii.org/api/v1/budgets?&page=1"
 }
}

Parameters

The list is paginated. Use page to get the next page or use the links from links.

Get a budget

GET /api/v1/budgets/<id>

Returns a single budget.

Parameters

Use the include parameter to include related objects. These parameters can be combined (use a comma).

  • include=user. Includes the user.
  • include=transactions. Includes the transactions linked to the budget.

To set the amount of a budget, in a specific period, use the budget limit end point.

The list of transaction can be very long. It is paginated according to the users preferences (usually 50). Use page for pagination. This list can also be limited by using the start and end date parameter.

Create a budget

POST /api/v1/budgets

Creates a new budget. To set the amount of a budget, in a specific period, use the budget limit end point.

Parameters

Required global fields

  • name. Name of the new budget.
  • active. Is the budget active? Submit 0 or 1.

Update a budget

PUT /api/v1/budgets/<id>

The same rules as above apply. To set the amount of a budget, in a specific period, use the budget limit end point.

Delete a budget

DELETE /api/v1/budgets/<id>

Will delete the budget. Other data is not removed. Budget limits are deleted as well.