# Rillet

> Run accounting in Rillet: sync customers and vendors, create invoices and bills, record payments, post journal entries, read contracts and pull the income statement and balance sheet.

App · 27 actions. Web page: https://docs.lodol.com/docs/integrations/rillet

## Actions

### Create bill

Enter a vendor's bill to pay later. The expense account and due date default to the vendor's own.

**Inputs**

- Vendor (`vendor_id`, text, required): The vendor. Pick one, or give its id from an earlier step.
- Bill number (`bill_number`, text, required): The number on the vendor's bill.
- Amount (`amount`, number, required): The bill's total, such as 250.00.
- Expense account (`account_code`, text): The expense account. Defaults to the vendor's.
- Description (`description`, text): What the bill is for.
- Bill date (`bill_date`, date): The bill's date. Defaults to today.
- Due date (`due_date`, date): When it is due. Defaults to the bill date plus the vendor's payment terms.
- Currency (`currency`, text): The bill's three-letter currency code, such as USD. Defaults to the subsidiary's currency.
- Subsidiary (`subsidiary_id`, text): The subsidiary. Leave empty for the organization's default one.
- More lines (`more_lines`, list): Lines after the first, each with an amount and, if you like, an account code and description.

**Outputs**

- `bill` (object): The bill

**Example output**

```json
{
  "bill": {
    "bill_date": "2026-10-15",
    "due_date": "2026-11-14",
    "expense_number": "B123",
    "id": "0193a6f2-ce9a-7302-9fbb-a0de6c9d5bc8",
    "items": [
      {
        "account_code": "60000",
        "amount": {
          "amount": "250.00",
          "currency": "USD"
        },
        "description": "API Bill",
        "id": "0193a6f2-dfab-7413-8acc-b1ef7dae6cd9"
      }
    ],
    "status": "UNPAID",
    "subsidiary_id": "0193a6f2-7f4b-7ebd-8a6c-5b8f1d4e0c73",
    "updated_at": "2026-10-15T09:00:00Z",
    "vendor_id": "0193a6f2-bd8f-72f1-8eaa-9fcd5b8c4ab7"
  }
}
```

### Create customer

Add a customer to invoice, with a billing email, payment terms and billing address.

**Inputs**

- Name (`name`, text, required): The customer's name.
- Name on invoices (`name_on_invoice`, text): The name printed on invoices, when it differs from the name.
- Billing email (`email`, text): The address invoices are emailed to.
- Payment terms (days) (`payment_terms`, number): Days the customer has to pay each invoice, such as 30. From 0 to 365.
- Street address (`address_line1`, text): The first line of the address, such as 123 Main St.
- Address line 2 (`address_line2`, text): An apartment, suite or floor.
- City (`city`, text): The city.
- State (`state`, text): The state or province code, such as CA. Needed for a United States address.
- Postal code (`zip_code`, text): The ZIP or postal code.
- Country (`country`, text): The two-letter country code, such as US or GB.
- Email invoices automatically (`send_invoices_automatically`, true/false): Have Rillet email each invoice to the customer on its date.
- Send payment reminders (`send_payment_reminders`, true/false): Have Rillet remind the customer about unpaid invoices.

**Outputs**

- `customer` (object): The customer

**Example output**

```json
{
  "customer": {
    "billing_addresses": [
      {
        "city": "Nashville",
        "country": "US",
        "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f42",
        "line1": "123 Main St",
        "line2": "Apt 4B",
        "state": "TN",
        "zip_code": "37201"
      }
    ],
    "emails": [
      {
        "email": "bobjohnson@somedomain.com",
        "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f41",
        "type": "MAIN_SENDER"
      }
    ],
    "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f40",
    "name": "Bob",
    "name_on_invoice": "Bob Johnson",
    "payment_terms": 30,
    "send_invoices_automatically": false,
    "send_payment_reminders": false,
    "updated_at": "2026-10-15T09:00:00Z"
  }
}
```

### Create invoice

Create an invoice for a customer, numbered by Rillet. Each line is a product, priced from the product unless a price is given. If an approval workflow applies, the invoice waits for approval.

**Inputs**

- Customer (`customer_id`, text, required): The customer. Pick one, or give its id from an earlier step.
- Product (`product_id`, text, required): The product. Pick one, or give its id from an earlier step.
- Quantity (`quantity`, number): How many. Defaults to 1.
- Unit price (`unit_price`, number): The price per unit. Defaults to the product's price.
- Currency (`currency`, text): The invoice's three-letter currency code, such as USD. Defaults to the product's currency.
- Line description (`description`, text): The line's text. Defaults to the product's description.
- Invoice date (`invoice_date`, date): The invoice's date. Defaults to today.
- Due date (`due_date`, date): When it is due. Defaults to the invoice date.
- Service from (`service_start`, date): The first day of the service billed, for spreading the revenue. Defaults to the invoice date.
- Service until (`service_end`, date): The last day of the service billed.
- Memo (`memo`, text): A note printed on the invoice.
- PO number (`purchase_order_number`, text): The customer's purchase order number.
- Subsidiary (`subsidiary_id`, text): The subsidiary. Leave empty for the organization's default one.
- More lines (`more_lines`, list): Lines after the first, each with a product id and, if you like, a quantity, unit price and description.

**Outputs**

- `approval_request_id` (text): The approval request's id, when it waits for approval
- `approval_status` (text): created, or pending approval when an approval workflow holds it
- `invoice` (object): The invoice; empty while it waits for approval
- `invoice_id` (text): The invoice's id

**Example output**

```json
{
  "approval_request_id": "",
  "approval_status": "created",
  "invoice": {
    "amount_due": {
      "amount": "20.00",
      "currency": "USD"
    },
    "contract_id": null,
    "customer_id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f40",
    "due_date": "2026-11-14",
    "id": "0193a6f2-6e3a-7dac-9f5b-4a7e0c3d9b62",
    "invoice_date": "2026-10-15",
    "invoice_number": "INV01",
    "items": [
      {
        "description": "Subscription to english classes",
        "gross_rate": {
          "amount": "10.00",
          "currency": "USD"
        },
        "id": "0193a6f2-8a5c-7fce-9b7d-6c9a2e5f1d84",
        "product_id": "0193a6f2-5d2f-7c9b-8e4a-3f6d9b2c8a51",
        "quantity": "2.0000",
        "taxed_amount": {
          "amount": "0.00",
          "currency": "USD"
        },
        "total_amount": {
          "amount": "20.00",
          "currency": "USD"
        }
      }
    ],
    "memo": null,
    "overdue": false,
    "purchase_order_number": "PO-12345",
    "sent_at": null,
    "status": "UNPAID",
    "subsidiary_id": "0193a6f2-7f4b-7ebd-8a6c-5b8f1d4e0c73",
    "subtotal": {
      "amount": "20.00",
      "currency": "USD"
    },
    "taxed_amount": {
      "amount": "0.00",
      "currency": "USD"
    },
    "total": {
      "amount": "20.00",
      "currency": "USD"
    },
    "updated_at": "2026-10-15T09:00:00Z"
  },
  "invoice_id": "0193a6f2-6e3a-7dac-9f5b-4a7e0c3d9b62"
}
```

### Create journal entry

Post a manual journal entry: an amount debited to one account and credited to another, or a list of lines whose debits equal their credits.

**Inputs**

- Name (`name`, text, required): What the entry is for.
- Amount (`amount`, number): The amount to move. Leave empty when giving lines.
- Debit account (`debit_account_code`, text): The account debited. Leave empty when giving lines.
- Credit account (`credit_account_code`, text): The account credited. Leave empty when giving lines.
- Line description (`description`, text): Text for each line.
- Date (`entry_date`, date): The posting date. Defaults to today.
- Currency (`currency`, text): The entry's three-letter currency code, such as USD. Defaults to the subsidiary's currency.
- Subsidiary (`subsidiary_id`, text): The subsidiary. Leave empty for the organization's default one.
- Reverse on (`reversal_date`, date): A date to reverse the entry automatically, such as the first of next month for an accrual.
- Lines (`lines`, list): Instead of one amount: each line's account code, side (DEBIT or CREDIT) and amount. Debits must equal credits.

**Outputs**

- `journal_entry` (object): The journal entry

**Example output**

```json
{
  "journal_entry": {
    "book_id": "0193a6f2-f1cd-7635-8cee-d3019fc08efb",
    "currency": "USD",
    "date": "2026-10-31",
    "id": "0193a6f2-e0bc-7524-9bdd-c2f08ebf7dea",
    "items": [
      {
        "account_code": "60000",
        "account_id": "0193a6f3-13ef-7857-8e00-f523b1e2a01d",
        "amount": {
          "amount": "500.00",
          "currency": "USD"
        },
        "description": "October hosting",
        "id": "0193a6f3-02de-7746-9dff-e412a0d19f0c",
        "side": "DEBIT"
      },
      {
        "account_code": "20000",
        "account_id": "0193a6f3-3501-7a79-8a22-1745d304c23f",
        "amount": {
          "amount": "500.00",
          "currency": "USD"
        },
        "description": "October hosting",
        "id": "0193a6f3-24f0-7968-9f11-0634c2f3b12e",
        "side": "CREDIT"
      }
    ],
    "name": "Accrue October hosting",
    "reversal_date": "2026-11-01",
    "subsidiary_id": "0193a6f2-7f4b-7ebd-8a6c-5b8f1d4e0c73",
    "updated_at": "2026-10-31T09:00:00Z"
  }
}
```

### Create product

Add a product or service to sell on invoices, with its price, how often it is billed and the income account it posts to.

**Inputs**

- Name (`name`, text, required): The product's name.
- Price (`price`, number, required): The price per unit, such as 99.00.
- Income account (`revenue_account_code`, text, required): The income account the product's revenue posts to.
- Billed (`billing`, text): Once, or again every month, quarter, half year or year. One of: `ONE_TIME` (One time (default)), `MONTHLY` (Every month), `QUARTERLY` (Every 3 months), `HALF_YEARLY` (Every 6 months), `YEARLY` (Every year).
- Currency (`currency`, text): The price's three-letter currency code, such as USD. Defaults to your organization's currency.
- Description (`description`, text): What it is. Defaults to the name.
- Revenue recognition (`revenue_pattern`, text): How its revenue is spread over the service period. One of: `DAILY` (Spread evenly by day (default)), `EVEN_PERIOD` (Spread evenly by month).
- Count towards ARR and MRR (`include_in_arr_mrr`, true/false): Whether its revenue counts as recurring. Defaults to yes for a recurring price and no for a one-time price.

**Outputs**

- `product` (object): The product

**Example output**

```json
{
  "product": {
    "account_code": "40000",
    "description": "Subscription to english classes",
    "id": "0193a6f2-5d2f-7c9b-8e4a-3f6d9b2c8a51",
    "include_in_arr_mrr": true,
    "name": "English subscription",
    "price": {
      "amount": {
        "amount": "10.00",
        "currency": "USD"
      },
      "interval_months": 1,
      "type": "FIXED_RECURRING"
    },
    "revenue_pattern": "DAILY",
    "status": "ACTIVE",
    "type": "PRODUCT"
  }
}
```

### Create vendor

Add a vendor to enter bills for, with the expense account and payment terms its bills use by default.

**Inputs**

- Name (`name`, text, required): The vendor's name.
- Email (`email`, text): The vendor's email address.
- Default expense account (`default_account_code`, text): The expense account the vendor's bills post to.
- Payment terms (days) (`payment_terms`, number): Days until the vendor's bills are due, such as 30. From 0 to 180.
- Tax ID (`tax_id`, text): The vendor's tax id, such as an EIN.
- Gets a 1099 (`eligible_for_1099`, true/false): Whether the vendor is due a 1099 form.
- Street address (`address_line1`, text): The first line of the address, such as 123 Main St.
- Address line 2 (`address_line2`, text): An apartment, suite or floor.
- City (`city`, text): The city.
- State (`state`, text): The state or province code, such as CA. Needed for a United States address.
- Postal code (`zip_code`, text): The ZIP or postal code.
- Country (`country`, text): The two-letter country code, such as US or GB.

**Outputs**

- `vendor` (object): The vendor

**Example output**

```json
{
  "vendor": {
    "account_code": "60000",
    "address": {
      "city": "Nashville",
      "country": "US",
      "line1": "123 Main St",
      "line2": null,
      "state": "TN",
      "zip_code": "37201"
    },
    "email": "billing@myvendor.example",
    "id": "0193a6f2-bd8f-72f1-8eaa-9fcd5b8c4ab7",
    "name": "MyVendor",
    "payment_terms": 30,
    "tax_id": "123",
    "ten_ninety_nine_eligible": false,
    "updated_at": "2026-10-15T09:00:00Z"
  }
}
```

### Delete bill

Delete a bill for good, such as one entered by mistake.

**Inputs**

- Bill ID (`bill_id`, text, required): The bill's id, from 'List bills' or an earlier step.

**Outputs**

- `bill_id` (text): The bill deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "bill_id": "0193a6f2-ce9a-7302-9fbb-a0de6c9d5bc8",
  "deleted": true
}
```

### Delete customer

Delete a customer for good. Do this only when no contract or invoice still belongs to them.

**Inputs**

- Customer (`customer_id`, text, required): The customer. Pick one, or give its id from an earlier step.

**Outputs**

- `customer_id` (text): The customer deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "customer_id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f40",
  "deleted": true
}
```

### Delete invoice

Delete an invoice for good, such as one made by mistake. Delete its payments first.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's id, from 'List invoices' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `invoice_id` (text): The invoice deleted

**Example output**

```json
{
  "deleted": true,
  "invoice_id": "0193a6f2-6e3a-7dac-9f5b-4a7e0c3d9b62"
}
```

### Delete invoice payment

Undo a payment recorded by mistake, so the invoice is owed again. Only payments that have not cleared can be deleted.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's id, from 'List invoices' or an earlier step.
- Payment ID (`payment_id`, text, required): The payment's id, from 'Record invoice payment'.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `invoice_id` (text): The invoice the payment was on
- `payment_id` (text): The payment deleted

**Example output**

```json
{
  "deleted": true,
  "invoice_id": "0193a6f2-6e3a-7dac-9f5b-4a7e0c3d9b62",
  "payment_id": "0193a6f2-9b6d-70df-8c8e-7dab3f6a2e95"
}
```

### Delete journal entry

Delete a manual journal entry for good, while its period is still open.

**Inputs**

- Journal entry ID (`journal_entry_id`, text, required): The entry's id, from 'List journal entries' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `journal_entry_id` (text): The journal entry deleted

**Example output**

```json
{
  "deleted": true,
  "journal_entry_id": "0193a6f2-e0bc-7524-9bdd-c2f08ebf7dea"
}
```

### Delete product

Delete a product for good. Do this only when no contract or invoice still needs it.

**Inputs**

- Product (`product_id`, text, required): The product. Pick one, or give its id from an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `product_id` (text): The product deleted

**Example output**

```json
{
  "deleted": true,
  "product_id": "0193a6f2-5d2f-7c9b-8e4a-3f6d9b2c8a51"
}
```

### Delete vendor

Delete a vendor for good. Do this only when no bill, credit or payment still belongs to them.

**Inputs**

- Vendor (`vendor_id`, text, required): The vendor. Pick one, or give its id from an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `vendor_id` (text): The vendor deleted

**Example output**

```json
{
  "deleted": true,
  "vendor_id": "0193a6f2-bd8f-72f1-8eaa-9fcd5b8c4ab7"
}
```

### Find customers

List customers, newest first, or find them by name. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Name (`search`, text): Only customers whose name matches this.
- Changed after (`updated_after`, date and time): Only those created or changed after this time.
- Page size (`limit`, number): How many to return, 1 to 100. Rillet's default is 25. From 1 to 100.
- Next page (`cursor`, text): The 'next_cursor' from an earlier page of the same list, to get the page after it. It works for two hours.

**Outputs**

- `count` (number): How many are on this page
- `customers` (list): The customers
- `next_cursor` (text): Pass as 'Next page' for the next page; empty on the last one

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "billing_addresses": [
        {
          "city": "Nashville",
          "country": "US",
          "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f42",
          "line1": "123 Main St",
          "line2": "Apt 4B",
          "state": "TN",
          "zip_code": "37201"
        }
      ],
      "emails": [
        {
          "email": "bobjohnson@somedomain.com",
          "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f41",
          "type": "MAIN_SENDER"
        }
      ],
      "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f40",
      "name": "Bob",
      "name_on_invoice": "Bob Johnson",
      "payment_terms": 30,
      "send_invoices_automatically": false,
      "send_payment_reminders": false,
      "updated_at": "2026-10-15T09:00:00Z"
    }
  ],
  "next_cursor": ""
}
```

### Get balance sheet

Get the balance sheet on a day: assets, liabilities and equity. Defaults to today.

**Inputs**

- On (`as_of_date`, date): The day the balances are for. Defaults to today.
- Subsidiary (`subsidiary_id`, text): Only this subsidiary. Leave empty for all of them.

**Outputs**

- `as_of_date` (text): The day, as YYYY-MM-DD
- `breakdowns` (list): The report's columns
- `currency` (text): The report's currency
- `sections` (list): The report's sections, with their groups and accounts
- `totals` (list): Each section's total, then each summary line

**Example output**

```json
{
  "as_of_date": "2026-10-31",
  "breakdowns": [
    {
      "id": null,
      "name": "Total",
      "type": "PERIOD"
    }
  ],
  "currency": "USD",
  "sections": [
    {
      "groups": [
        {
          "accounts": [
            {
              "balances": [
                {
                  "amount": {
                    "amount": "250000.00",
                    "currency": "USD"
                  },
                  "breakdown_id": "0193a6f3-5723-7c9b-8c44-3967f526e451"
                }
              ],
              "code": "10100",
              "id": "0193a6f3-6834-7dac-9d55-4a78a637f562",
              "name": "Cash"
            }
          ],
          "name": "Current Assets",
          "totals": [
            {
              "amount": {
                "amount": "250000.00",
                "currency": "USD"
              },
              "breakdown_id": "0193a6f3-5723-7c9b-8c44-3967f526e451"
            }
          ]
        }
      ],
      "name": "Assets",
      "totals": [
        {
          "amount": {
            "amount": "250000.00",
            "currency": "USD"
          },
          "breakdown_id": "0193a6f3-5723-7c9b-8c44-3967f526e451"
        }
      ]
    }
  ],
  "totals": [
    {
      "amount": "250000.00",
      "currency": "USD",
      "name": "Assets"
    }
  ]
}
```

### Get customer

Get one customer with their billing emails and addresses.

**Inputs**

- Customer (`customer_id`, text, required): The customer. Pick one, or give its id from an earlier step.

**Outputs**

- `customer` (object): The customer

**Example output**

```json
{
  "customer": {
    "billing_addresses": [
      {
        "city": "Nashville",
        "country": "US",
        "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f42",
        "line1": "123 Main St",
        "line2": "Apt 4B",
        "state": "TN",
        "zip_code": "37201"
      }
    ],
    "emails": [
      {
        "email": "bobjohnson@somedomain.com",
        "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f41",
        "type": "MAIN_SENDER"
      }
    ],
    "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f40",
    "name": "Bob",
    "name_on_invoice": "Bob Johnson",
    "payment_terms": 30,
    "send_invoices_automatically": false,
    "send_payment_reminders": false,
    "updated_at": "2026-10-15T09:00:00Z"
  }
}
```

### Get income statement

Get the profit and loss for a date range: revenue, costs, gross profit and net income. Defaults to this month so far.

**Inputs**

- From (`from_date`, date): The first day. Defaults to the first of this month.
- To (`to_date`, date): The last day. Defaults to today.
- Subsidiary (`subsidiary_id`, text): Only this subsidiary. Leave empty for all of them.

**Outputs**

- `breakdowns` (list): The report's columns
- `currency` (text): The report's currency
- `period` (object): The dates the report covers
- `sections` (list): The report's sections, with their groups and accounts
- `summaries` (list): Summary lines such as Gross Profit and Net Income
- `totals` (list): Each section's total, then each summary line

**Example output**

```json
{
  "breakdowns": [
    {
      "id": null,
      "name": "Total",
      "type": "PERIOD"
    }
  ],
  "currency": "USD",
  "period": {
    "from_date": "2026-10-01",
    "to_date": "2026-10-31"
  },
  "sections": [
    {
      "groups": [
        {
          "accounts": [
            {
              "balances": [
                {
                  "amount": {
                    "amount": "12500.00",
                    "currency": "USD"
                  },
                  "breakdown_id": "0193a6f3-5723-7c9b-8c44-3967f526e451"
                }
              ],
              "code": "40000",
              "id": "0193a6f3-6834-7dac-9d55-4a78a637f562",
              "name": "Sales"
            }
          ],
          "name": "Subscription Revenue",
          "totals": [
            {
              "amount": {
                "amount": "12500.00",
                "currency": "USD"
              },
              "breakdown_id": "0193a6f3-5723-7c9b-8c44-3967f526e451"
            }
          ]
        }
      ],
      "name": "Revenue",
      "totals": [
        {
          "amount": {
            "amount": "12500.00",
            "currency": "USD"
          },
          "breakdown_id": "0193a6f3-5723-7c9b-8c44-3967f526e451"
        }
      ]
    }
  ],
  "summaries": [
    {
      "amounts": [
        {
          "amount": {
            "amount": "4200.00",
            "currency": "USD"
          },
          "breakdown_id": "0193a6f3-5723-7c9b-8c44-3967f526e451"
        }
      ],
      "name": "Net Income"
    }
  ],
  "totals": [
    {
      "amount": "12500.00",
      "currency": "USD",
      "name": "Revenue"
    },
    {
      "amount": "4200.00",
      "currency": "USD",
      "name": "Net Income"
    }
  ]
}
```

### Get invoice

Get one invoice with its lines, totals, amount still due and payment status.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's id, from 'List invoices' or an earlier step.

**Outputs**

- `invoice` (object): The invoice

**Example output**

```json
{
  "invoice": {
    "amount_due": {
      "amount": "20.00",
      "currency": "USD"
    },
    "contract_id": null,
    "customer_id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f40",
    "due_date": "2026-11-14",
    "id": "0193a6f2-6e3a-7dac-9f5b-4a7e0c3d9b62",
    "invoice_date": "2026-10-15",
    "invoice_number": "INV01",
    "items": [
      {
        "description": "Subscription to english classes",
        "gross_rate": {
          "amount": "10.00",
          "currency": "USD"
        },
        "id": "0193a6f2-8a5c-7fce-9b7d-6c9a2e5f1d84",
        "product_id": "0193a6f2-5d2f-7c9b-8e4a-3f6d9b2c8a51",
        "quantity": "2.0000",
        "taxed_amount": {
          "amount": "0.00",
          "currency": "USD"
        },
        "total_amount": {
          "amount": "20.00",
          "currency": "USD"
        }
      }
    ],
    "memo": null,
    "overdue": false,
    "purchase_order_number": "PO-12345",
    "sent_at": null,
    "status": "UNPAID",
    "subsidiary_id": "0193a6f2-7f4b-7ebd-8a6c-5b8f1d4e0c73",
    "subtotal": {
      "amount": "20.00",
      "currency": "USD"
    },
    "taxed_amount": {
      "amount": "0.00",
      "currency": "USD"
    },
    "total": {
      "amount": "20.00",
      "currency": "USD"
    },
    "updated_at": "2026-10-15T09:00:00Z"
  }
}
```

### List accounts

List the chart of accounts with each account's code, name and type, optionally only one type.

**Inputs**

- Type (`account_type`, text): Only accounts of this type. One of: `INCOME`, `EXPENSE`, `ASSET`, `BANK` (Bank and cash), `LIABILITY`, `EQUITY`.
- Include inactive accounts (`include_inactive`, true/false): Also list accounts that are no longer in use.

**Outputs**

- `accounts` (list): The accounts, by code
- `count` (number): How many

**Example output**

```json
{
  "accounts": [
    {
      "code": "10100",
      "id": "0193a6f3-4612-7b8a-9b33-2856e415d340",
      "name": "Mercury Savings",
      "parent_grouping": "Cash",
      "status": "ACTIVE",
      "subtype": "Bank",
      "type": "ASSET",
      "updated_at": "2026-10-01T09:00:00Z"
    }
  ],
  "count": 1
}
```

### List bills

List bills, newest first, by vendor or payment status. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Vendor (`vendor_id`, text): Only this vendor's.
- Payment status (`status`, text): Only bills with this payment status. One of: `UNPAID`, `PARTIALLY_PAID` (Partly paid), `PAID`, `PARTIALLY_CREDITED` (Partly credited), `CREDITED`, `APPLIED`.
- Subsidiary (`subsidiary_id`, text): Only this subsidiary's. Leave empty for all of them.
- Changed after (`updated_after`, date and time): Only those created or changed after this time.
- Page size (`limit`, number): How many to return, 1 to 100. Rillet's default is 25. From 1 to 100.
- Next page (`cursor`, text): The 'next_cursor' from an earlier page of the same list, to get the page after it. It works for two hours.

**Outputs**

- `bills` (list): The bills
- `count` (number): How many are on this page
- `next_cursor` (text): Pass as 'Next page' for the next page; empty on the last one

**Example output**

```json
{
  "bills": [
    {
      "bill_date": "2026-10-15",
      "due_date": "2026-11-14",
      "expense_number": "B123",
      "id": "0193a6f2-ce9a-7302-9fbb-a0de6c9d5bc8",
      "items": [
        {
          "account_code": "60000",
          "amount": {
            "amount": "250.00",
            "currency": "USD"
          },
          "description": "API Bill",
          "id": "0193a6f2-dfab-7413-8acc-b1ef7dae6cd9"
        }
      ],
      "status": "UNPAID",
      "subsidiary_id": "0193a6f2-7f4b-7ebd-8a6c-5b8f1d4e0c73",
      "updated_at": "2026-10-15T09:00:00Z",
      "vendor_id": "0193a6f2-bd8f-72f1-8eaa-9fcd5b8c4ab7"
    }
  ],
  "count": 1,
  "next_cursor": ""
}
```

### List contracts

List customer contracts, newest first, by customer, status or end date, for example to find renewals coming up. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Customer (`customer_id`, text): Only this customer's.
- Status (`status`, text): Only contracts with this status. One of: `ACTIVE`, `IN_EFFECT` (In effect), `ENDED`, `CANCELLED`, `AMENDED`.
- Ending on or after (`ending_from`, date): Only contracts that end on or after this date.
- Ending on or before (`ending_until`, date): Only contracts that end on or before this date.
- Subsidiary (`subsidiary_id`, text): Only this subsidiary's. Leave empty for all of them.
- Page size (`limit`, number): How many to return, 1 to 100. Rillet's default is 25. From 1 to 100.
- Next page (`cursor`, text): The 'next_cursor' from an earlier page of the same list, to get the page after it. It works for two hours.

**Outputs**

- `contracts` (list): The contracts
- `count` (number): How many are on this page
- `next_cursor` (text): Pass as 'Next page' for the next page; empty on the last one

**Example output**

```json
{
  "contracts": [
    {
      "close_date": "2025-12-15",
      "customer_id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f40",
      "end_date": "2026-12-31",
      "id": "0193a6f2-ac7e-71e0-9d9f-8ebc4a7b3fa6",
      "items": [
        {
          "end_date": "2026-12-31",
          "product_id": "0193a6f2-5d2f-7c9b-8e4a-3f6d9b2c8a51",
          "quantity": "1",
          "start_date": "2026-01-01",
          "status": "ACTIVE",
          "total_value": {
            "amount": "120.00",
            "currency": "USD"
          }
        }
      ],
      "name": "New API Contract",
      "purchase_order_number": "PO-12345",
      "start_date": "2026-01-01",
      "status": "ACTIVE",
      "subsidiary_id": "0193a6f2-7f4b-7ebd-8a6c-5b8f1d4e0c73",
      "total_value": {
        "amount": "120.00",
        "currency": "USD"
      }
    }
  ],
  "count": 1,
  "next_cursor": ""
}
```

### List invoices

List invoices, newest first, by customer, payment status or overdue. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Customer (`customer_id`, text): Only this customer's.
- Payment status (`status`, text): Only invoices with this payment status. One of: `UNPAID`, `PARTIALLY_PAID` (Partly paid), `PAID`, `UNBILLED`, `PARTIALLY_CREDITED` (Partly credited), `CREDITED`.
- Only overdue (`overdue_only`, true/false): Only invoices past their due date.
- Subsidiary (`subsidiary_id`, text): Only this subsidiary's. Leave empty for all of them.
- Changed after (`updated_after`, date and time): Only those created or changed after this time.
- Page size (`limit`, number): How many to return, 1 to 100. Rillet's default is 25. From 1 to 100.
- Next page (`cursor`, text): The 'next_cursor' from an earlier page of the same list, to get the page after it. It works for two hours.

**Outputs**

- `count` (number): How many are on this page
- `invoices` (list): The invoices
- `next_cursor` (text): Pass as 'Next page' for the next page; empty on the last one

**Example output**

```json
{
  "count": 1,
  "invoices": [
    {
      "amount_due": {
        "amount": "20.00",
        "currency": "USD"
      },
      "contract_id": null,
      "customer_id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f40",
      "due_date": "2026-11-14",
      "id": "0193a6f2-6e3a-7dac-9f5b-4a7e0c3d9b62",
      "invoice_date": "2026-10-15",
      "invoice_number": "INV01",
      "items": [
        {
          "description": "Subscription to english classes",
          "gross_rate": {
            "amount": "10.00",
            "currency": "USD"
          },
          "id": "0193a6f2-8a5c-7fce-9b7d-6c9a2e5f1d84",
          "product_id": "0193a6f2-5d2f-7c9b-8e4a-3f6d9b2c8a51",
          "quantity": "2.0000",
          "taxed_amount": {
            "amount": "0.00",
            "currency": "USD"
          },
          "total_amount": {
            "amount": "20.00",
            "currency": "USD"
          }
        }
      ],
      "memo": null,
      "overdue": false,
      "purchase_order_number": "PO-12345",
      "sent_at": null,
      "status": "UNPAID",
      "subsidiary_id": "0193a6f2-7f4b-7ebd-8a6c-5b8f1d4e0c73",
      "subtotal": {
        "amount": "20.00",
        "currency": "USD"
      },
      "taxed_amount": {
        "amount": "0.00",
        "currency": "USD"
      },
      "total": {
        "amount": "20.00",
        "currency": "USD"
      },
      "updated_at": "2026-10-15T09:00:00Z"
    }
  ],
  "next_cursor": ""
}
```

### List journal entries

List journal entries, newest first, posted between two dates. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Posted on or after (`from_date`, date): Only entries posted on or after this date.
- Posted on or before (`to_date`, date): Only entries posted on or before this date.
- Subsidiary (`subsidiary_id`, text): Only this subsidiary's. Leave empty for all of them.
- Changed after (`updated_after`, date and time): Only those created or changed after this time.
- Page size (`limit`, number): How many to return, 1 to 100. Rillet's default is 25. From 1 to 100.
- Next page (`cursor`, text): The 'next_cursor' from an earlier page of the same list, to get the page after it. It works for two hours.

**Outputs**

- `count` (number): How many are on this page
- `journal_entries` (list): The journal entries
- `next_cursor` (text): Pass as 'Next page' for the next page; empty on the last one

**Example output**

```json
{
  "count": 1,
  "journal_entries": [
    {
      "book_id": "0193a6f2-f1cd-7635-8cee-d3019fc08efb",
      "currency": "USD",
      "date": "2026-10-31",
      "id": "0193a6f2-e0bc-7524-9bdd-c2f08ebf7dea",
      "items": [
        {
          "account_code": "60000",
          "account_id": "0193a6f3-13ef-7857-8e00-f523b1e2a01d",
          "amount": {
            "amount": "500.00",
            "currency": "USD"
          },
          "description": "October hosting",
          "id": "0193a6f3-02de-7746-9dff-e412a0d19f0c",
          "side": "DEBIT"
        },
        {
          "account_code": "20000",
          "account_id": "0193a6f3-3501-7a79-8a22-1745d304c23f",
          "amount": {
            "amount": "500.00",
            "currency": "USD"
          },
          "description": "October hosting",
          "id": "0193a6f3-24f0-7968-9f11-0634c2f3b12e",
          "side": "CREDIT"
        }
      ],
      "name": "Accrue October hosting",
      "reversal_date": "2026-11-01",
      "subsidiary_id": "0193a6f2-7f4b-7ebd-8a6c-5b8f1d4e0c73",
      "updated_at": "2026-10-31T09:00:00Z"
    }
  ],
  "next_cursor": ""
}
```

### List vendors

List vendors, newest first. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Changed after (`updated_after`, date and time): Only those created or changed after this time.
- Page size (`limit`, number): How many to return, 1 to 100. Rillet's default is 25. From 1 to 100.
- Next page (`cursor`, text): The 'next_cursor' from an earlier page of the same list, to get the page after it. It works for two hours.

**Outputs**

- `count` (number): How many are on this page
- `next_cursor` (text): Pass as 'Next page' for the next page; empty on the last one
- `vendors` (list): The vendors

**Example output**

```json
{
  "count": 1,
  "next_cursor": "",
  "vendors": [
    {
      "account_code": "60000",
      "address": {
        "city": "Nashville",
        "country": "US",
        "line1": "123 Main St",
        "line2": null,
        "state": "TN",
        "zip_code": "37201"
      },
      "email": "billing@myvendor.example",
      "id": "0193a6f2-bd8f-72f1-8eaa-9fcd5b8c4ab7",
      "name": "MyVendor",
      "payment_terms": 30,
      "tax_id": "123",
      "ten_ninety_nine_eligible": false,
      "updated_at": "2026-10-15T09:00:00Z"
    }
  ]
}
```

### Mark invoice as sent

Record that an invoice was sent to the customer, for example by another system, or mark it as not sent again.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's id, from 'List invoices' or an earlier step.
- Sent (`sent`, true/false): On to mark it as sent, off to mark it as not sent. Default: `true`.

**Outputs**

- `invoice_id` (text): The invoice's id
- `sent` (true/false): Whether it is now marked as sent

**Example output**

```json
{
  "invoice_id": "0193a6f2-6e3a-7dac-9f5b-4a7e0c3d9b62",
  "sent": true
}
```

### Record invoice payment

Record money received for an invoice into a bank or cash account. Defaults to the full amount still due, today.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's id, from 'List invoices' or an earlier step.
- Paid into (`account_code`, text, required): The bank or cash account the money went into.
- Amount (`amount`, number): How much was paid, in the invoice's currency. Defaults to all that is still due.
- Payment date (`payment_date`, date): When it was paid. Defaults to today.

**Outputs**

- `payment` (object): The payment

**Example output**

```json
{
  "payment": {
    "account_code": "10100",
    "amount": {
      "amount": "20.00",
      "currency": "USD"
    },
    "date": "2026-10-20",
    "id": "0193a6f2-9b6d-70df-8c8e-7dab3f6a2e95",
    "invoice_id": "0193a6f2-6e3a-7dac-9f5b-4a7e0c3d9b62",
    "status": "UNCLEARED",
    "updated_at": "2026-10-20T09:00:00Z"
  }
}
```

### Update customer

Change a customer's name, billing email, payment terms, billing address or reminder settings. Only the fields given change.

**Inputs**

- Customer (`customer_id`, text, required): The customer. Pick one, or give its id from an earlier step.
- Name (`name`, text): A new name. Leave empty to keep it.
- Name on invoices (`name_on_invoice`, text): The name printed on invoices, when it differs from the name.
- Billing email (`email`, text): The address invoices are emailed to.
- Payment terms (days) (`payment_terms`, number): Days the customer has to pay each invoice, such as 30. From 0 to 365.
- Street address (`address_line1`, text): The first line of the address, such as 123 Main St.
- Address line 2 (`address_line2`, text): An apartment, suite or floor.
- City (`city`, text): The city.
- State (`state`, text): The state or province code, such as CA. Needed for a United States address.
- Postal code (`zip_code`, text): The ZIP or postal code.
- Country (`country`, text): The two-letter country code, such as US or GB.
- Email invoices automatically (`send_invoices_automatically`, true/false): Have Rillet email each invoice to the customer on its date.
- Send payment reminders (`send_payment_reminders`, true/false): Have Rillet remind the customer about unpaid invoices.

**Outputs**

- `customer` (object): The customer

**Example output**

```json
{
  "customer": {
    "billing_addresses": [
      {
        "city": "Nashville",
        "country": "US",
        "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f42",
        "line1": "123 Main St",
        "line2": "Apt 4B",
        "state": "TN",
        "zip_code": "37201"
      }
    ],
    "emails": [
      {
        "email": "bobjohnson@somedomain.com",
        "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f41",
        "type": "MAIN_SENDER"
      }
    ],
    "id": "0193a6f2-4c1e-7b8a-9d3f-2e5c8a1b7f40",
    "name": "Bob",
    "name_on_invoice": "Bob Johnson",
    "payment_terms": 30,
    "send_invoices_automatically": false,
    "send_payment_reminders": false,
    "updated_at": "2026-10-15T09:00:00Z"
  }
}
```
