# Lunch Money

> Track personal finances with Lunch Money: list and add transactions, read your categories and manually managed account balances, and pull budgeted-versus-spent figures by month.

App · Accounting & Finance · 5 actions. Web page: https://docs.lodol.com/docs/integrations/lunch-money

## Actions

### Get budgets

Get what was budgeted and what was actually spent per category over a date range, one figure per month.

**Inputs**

- Start date (`start_date`, text, required): The first month to include. Must be the first of a month, as YYYY-MM-01.
- End date (`end_date`, text, required): The last date to include, as YYYY-MM-DD.

**Outputs**

- `budgets` (list): One entry per category.
- `count` (number): How many categories were returned.

**Example output**

```json
{
  "budgets": [
    {
      "archived": false,
      "category_group_name": "Food & Drink",
      "category_id": 83,
      "category_name": "Coffee Shops",
      "exclude_from_budget": false,
      "exclude_from_totals": false,
      "group_id": 12,
      "is_group": false,
      "is_income": false,
      "months": [
        {
          "budget_currency": "usd",
          "budgeted": 60.0,
          "is_automated": false,
          "month": "2024-01-01",
          "num_transactions": 9,
          "spent": 41.25
        }
      ]
    }
  ],
  "count": 1
}
```

### Insert a transaction

Add one transaction to Lunch Money and get back the id it was given. Use a negative amount for money spent and a positive amount for money received.

**Inputs**

- Date (`date`, text, required): The transaction date, as YYYY-MM-DD.
- Amount (`amount`, text, required): The amount, for example -12.50 for money spent or 1500 for money received.
- Payee (`payee`, text): Optional. Who the money went to or came from.
- Category ID (`category_id`, number): Optional. Which category to file this under. List categories to find the id.
- Account ID (`asset_id`, number): Optional. Which manually managed account this belongs to. List accounts to find the id.
- Currency (`currency`, text): Optional. Lowercase ISO currency code, for example usd. Defaults to your Lunch Money primary currency.
- Notes (`notes`, text): Optional. A free-text note on the transaction.
- Status (`status`, text): Optional. Whether the transaction is settled. Lunch Money defaults to uncleared. One of: `cleared`, `uncleared`.
- Apply rules (`apply_rules`, true/false): Optional. Run your Lunch Money rules against the new transaction. Off by default. Default: `false`.

**Outputs**

- `transaction_id` (number): The id Lunch Money gave the new transaction. Null if it was skipped as a duplicate.

**Example output**

```json
{
  "transaction_id": 602
}
```

### List accounts

List the manually managed accounts and their balances. These are the accounts you keep up to date yourself, not the ones synced from a bank.

**Inputs**: None.

**Outputs**

- `assets` (list): Manually managed accounts.
- `count` (number): How many accounts were returned.

**Example output**

```json
{
  "assets": [
    {
      "balance": "8200.0000",
      "balance_as_of": "2024-01-14T00:00:00.000Z",
      "closed_on": null,
      "created_at": "2023-02-01T12:00:00.000Z",
      "currency": "usd",
      "display_name": "Emergency Fund",
      "exclude_transactions": false,
      "id": 118,
      "institution_name": "Ally Bank",
      "name": "Emergency Fund",
      "subtype_name": "savings",
      "type_name": "cash"
    }
  ],
  "count": 1
}
```

### List categories

List every spending and income category, with the ids needed to file or filter transactions.

**Inputs**: None.

**Outputs**

- `categories` (list): Every category in the account.
- `count` (number): How many categories were returned.

**Example output**

```json
{
  "categories": [
    {
      "archived": false,
      "created_at": "2023-06-14T09:03:00.000Z",
      "description": "Caf\u00e9s and coffee runs",
      "exclude_from_budget": false,
      "exclude_from_totals": false,
      "group_id": 12,
      "id": 83,
      "is_group": false,
      "is_income": false,
      "name": "Coffee Shops",
      "order": 3,
      "updated_at": "2024-01-02T18:22:11.000Z"
    }
  ],
  "count": 1
}
```

### List transactions

List transactions from Lunch Money, optionally narrowed to a date range, a category, an account, or a cleared status.

**Inputs**

- Start date (`start_date`, text): Optional. Earliest transaction date to include, as YYYY-MM-DD.
- End date (`end_date`, text): Optional. Latest transaction date to include, as YYYY-MM-DD.
- Category ID (`category_id`, number): Optional. Only transactions in this category. List categories to find the id.
- Account ID (`asset_id`, number): Optional. Only transactions in this manually managed account. List accounts to find the id.
- Status (`status`, text): Optional. Only transactions in this state. One of: `cleared`, `uncleared`, `pending`.
- Limit (`limit`, number): Optional. How many transactions to return, up to 1000. Lunch Money defaults to 1000.
- Offset (`offset`, number): Optional. Skip this many transactions, for paging.

**Outputs**

- `count` (number): How many transactions were returned.
- `has_more` (true/false): Whether more transactions match past this page. Raise the offset to fetch them.
- `transactions` (list): The matching transactions.

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "transactions": [
    {
      "account_display_name": "Everyday Checking",
      "amount": "-4.75",
      "asset_id": null,
      "asset_name": null,
      "category_id": 83,
      "category_name": "Coffee Shops",
      "currency": "usd",
      "date": "2024-01-15",
      "exclude_from_budget": false,
      "exclude_from_totals": false,
      "external_id": null,
      "group_id": null,
      "id": 602,
      "institution_name": "Wells Fargo",
      "is_group": false,
      "is_income": false,
      "is_pending": false,
      "notes": "Morning flat white",
      "original_name": "BLUE BOTTLE COFFEE #12",
      "parent_id": null,
      "payee": "Blue Bottle Coffee",
      "plaid_account_id": 41,
      "plaid_account_name": "Everyday Checking",
      "recurring_id": null,
      "status": "cleared",
      "tags": [
        {
          "id": 7,
          "name": "treat"
        }
      ]
    }
  ]
}
```
