# Finmei

Finmei is an invoicing tool designed to simplify billing processes, allowing users to create and manage invoices and track expenses efficiently.

- **Category:** accounting
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 24
- **Triggers:** 0
- **Slug:** `FINMEI`
- **Version:** 20260307_00

## Tools

### Create Expense

**Slug:** `FINMEI_CREATE_EXPENSE`

Tool to create a new expense with file upload (receipt or invoice). Use when you need to record an expense with supporting documentation. Requires multipart/form-data submission with file, date, total, currency, and seller information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | Yes | Date of the expense in YYYY-MM-DD format |
| `file` | object | Yes | Receipt file (PDF or image). |
| `total` | number | Yes | Total amount of the expense, must be non-negative |
| `seller` | string | Yes | Name of the seller/vendor from the invoice or receipt |
| `currency` | string | Yes | Uppercase three-letter ISO 4217 currency code |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Invoice

**Slug:** `FINMEI_CREATE_INVOICE`

Creates a new invoice in Finmei with buyer information and line items. Use this when you need to generate an invoice for a customer. You can specify: - Buyer details (person or company) - Products/services with quantities and prices - Invoice type (regular, VAT, preliminary, credit) - Currency, dates, and custom notes Example: "Create an invoice for Tech Solutions Inc with 3 months of support services at $99.99/month"

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `code` | string | No | Optional custom invoice code or reference |
| `type` | string ("regular_invoice" | "vat_invoice" | "preliminary_invoice" | "preliminary_vat_invoice" | "credit_invoice" | "credit_vat_invoice") | No | Invoice type required by API. Valid values: 'regular_invoice', 'vat_invoice', 'preliminary_invoice', 'preliminary_vat_invoice', 'credit_invoice', 'credit_vat_invoice' |
| `buyer` | object | No | Buyer object; required by API when not using customer_id |
| `notes` | string | No | Optional notes to appear on the invoice |
| `seller` | object | No | Seller object if not using default |
| `series` | string | No | Series code/prefix for the invoice |
| `currency` | string | No | ISO 4217 three-letter currency code |
| `customer` | object | No | Inline customer details; mutually exclusive with `customer_id` |
| `due_date` | string | No | Payment due date (YYYY-MM-DD) |
| `products` | array | No | Products array as required by API |
| `issue_date` | string | No | Date the invoice was issued (YYYY-MM-DD) |
| `line_items` | array | No | List of line items for the invoice |
| `customer_id` | string | No | ID of an existing customer; mutually exclusive with `customer` |
| `invoice_date` | string | No | Invoice date as expected by the API (YYYY-MM-DD) |
| `use_default_seller_info` | boolean | No | If true, API will use default seller info instead of requiring seller object |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Customer

**Slug:** `FINMEI_DELETE_CUSTOMER`

Tool to delete a specific customer by their ID. Use after confirming the correct customer_id to remove the record.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `customer_id` | string | Yes | Unique identifier of the customer to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Invoice

**Slug:** `FINMEI_DELETE_INVOICE`

Tool to delete an invoice. Use when you need to remove an existing invoice by its ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `invoice_id` | string | Yes | The unique identifier of the invoice to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Payment

**Slug:** `FINMEI_DELETE_PAYMENT`

Delete a payment record by its unique identifier. This action permanently removes the payment from the system. Returns success even if the payment doesn't exist (idempotent operation). Use this when you need to remove incorrect, duplicate, or obsolete payment records.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payment_id` | string | Yes | Unique identifier of the payment to delete. This is typically returned from payment creation or list operations. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Product

**Slug:** `FINMEI_DELETE_PRODUCT`

Deletes a product from the Finmei catalog by its unique identifier. This operation is idempotent - calling it multiple times with the same product_id will return success. The tool attempts multiple endpoint patterns to maximize compatibility across different Finmei API deployments. Use this when you need to: - Permanently remove a product from the catalog - Clean up discontinued or obsolete products - Remove test or duplicate product entries Note: If all API endpoints return 404, the action will succeed with a message explaining that the product doesn't exist or the API doesn't support deletion. This follows idempotent DELETE semantics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `product_id` | string | Yes | Unique identifier of the product to delete. This is the product's ID as returned by list_products or get_product operations. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Expense File

**Slug:** `FINMEI_DOWNLOAD_EXPENSE_FILE`

Tool to download the file associated with an expense. Returns the expense document file (PDF or image). Use when you need to retrieve the actual file content for an expense.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the expense to download the file for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Invoice PDF

**Slug:** `FINMEI_DOWNLOAD_INVOICE_PDF`

Tool to download an invoice as a PDF file. Use when you need to retrieve the PDF version of an invoice.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `invoice_id` | string | Yes | The unique identifier of the invoice to download as PDF |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Expense by ID

**Slug:** `FINMEI_GET_EXPENSE`

Tool to retrieve a single expense by its ID. Use when you need to get details about a specific expense including date, total, currency, and seller information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the expense to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Invoice by ID

**Slug:** `FINMEI_GET_INVOICE`

Tool to retrieve a single invoice by its ID. Use when you need full invoice details including buyer, seller, items, amounts, and payment options.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Invoice ID to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Payment

**Slug:** `FINMEI_GET_PAYMENT`

Tool to retrieve details of a specific payment by its ID. Use after creating a payment or when you need to confirm payment details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payment_id` | string | Yes | Unique identifier of the payment to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Product by ID

**Slug:** `FINMEI_GET_PRODUCT`

Tool to retrieve a product by its ID. Use when you need detailed information about a single product.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `product_id` | string | Yes | Unique identifier of the product to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Profile

**Slug:** `FINMEI_GET_PROFILE`

Tool to retrieve main information about the business to which the API token is assigned. Use when needing business ID, title, type, address, VAT code, company name, or company code.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Currencies

**Slug:** `FINMEI_LIST_CURRENCIES`

Tool to list all currencies supported by Finmei. Use when you need to retrieve available currency codes before creating transactions.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Customers

**Slug:** `FINMEI_LIST_CUSTOMERS`

Tool to list all customers with optional filters and pagination. Use when needing to browse or search customer records.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number to retrieve (must be >= 1) |
| `sort` | string | No | Sort order, e.g., 'name_asc' or 'created_at_desc' |
| `search` | string | No | Search term to filter customers by name or email |
| `per_page` | integer | No | Number of customers per page (1-100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Expenses

**Slug:** `FINMEI_LIST_EXPENSES`

Tool to list all expenses for the business. Use when you need a paginated list of expenses with metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number to retrieve (must be >= 1) |
| `per_page` | integer | No | Number of expenses per page (1-100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Invoices

**Slug:** `FINMEI_LIST_INVOICES`

Tool to list invoices. Use when you need a paginated list of invoices with basic details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number to retrieve (must be >= 1) |
| `per_page` | integer | No | Number of invoices per page (1-100) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Payments

**Slug:** `FINMEI_LIST_PAYMENTS`

Tool to retrieve a list of payments. Use when you need to view past payment records with optional filters and pagination.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Number of payments to retrieve (default 20, max 100) |
| `offset` | integer | No | Number of payments to skip for pagination |
| `status` | string ("pending" | "completed" | "failed") | No | Filter payments by status |
| `end_date` | string | No | Filter payments created on or before this date (ISO 8601 format) |
| `start_date` | string | No | Filter payments created on or after this date (ISO 8601 format) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Products

**Slug:** `FINMEI_LIST_PRODUCTS`

Tool to retrieve a list of products with optional filters and pagination. Use when you need to browse or filter the product catalog.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Filter products by name substring. |
| `page` | integer | No | Page number for pagination (1-indexed). |
| `status` | string ("active" | "inactive") | No | Filter products by their status. |
| `per_page` | integer | No | Number of products per page. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Customer

**Slug:** `FINMEI_UPDATE_CUSTOMER`

Tool to update an existing customer's details. Use after confirming the customer ID to modify their information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Full name of the customer |
| `email` | string | No | Email address of the customer |
| `phone` | string | No | Phone number of the customer |
| `address` | object | No | Mailing address details |
| `metadata` | object | No | Additional metadata for the customer as key-value pairs |
| `customer_id` | string | Yes | Unique identifier of the customer to update |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Expense

**Slug:** `FINMEI_UPDATE_EXPENSE`

Tool to update an existing expense's fields including date, total, currency, and seller. Use when you need to modify expense details. To update the invoice/bill file, use the Update Expense File endpoint instead.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the expense to update. Must be a valid existing expense ID. |
| `date` | string | Yes | Date of the expense in YYYY-MM-DD format. This field is required. |
| `total` | number | Yes | Total amount of the expense. Must be non-negative. This field is required. |
| `seller` | string | Yes | Name of the seller from invoice. This field is required. |
| `currency` | string | Yes | Uppercase three letter currency code (ISO 4217 format). Example: USD, EUR, GBP. This field is required. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Expense File

**Slug:** `FINMEI_UPDATE_EXPENSE_FILE`

Updates the file attachment of an existing expense in Finmei. Use this action when you need to attach or replace a receipt/invoice file for an expense. This endpoint is specifically for updating the file only - use the Update Expense action for updating other expense fields like amount, date, or description. The file is uploaded using multipart/form-data content type and typically should be a PDF or image file of the bill/receipt.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the expense to update the file for. Must be a valid existing expense ID. |
| `file` | object | Yes | File to upload as the expense attachment (usually PDF or image file of the bill). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Invoice

**Slug:** `FINMEI_UPDATE_INVOICE`

Tool to update an existing invoice in Finmei. Use when you need to modify invoice details such as buyer information, products, dates, or currency.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `code` | string | No | Optional custom invoice code or reference |
| `type` | string ("regular_invoice" | "vat_invoice" | "preliminary_invoice" | "preliminary_vat_invoice" | "credit_invoice" | "credit_vat_invoice") | No | Invoice type. Valid values: 'regular_invoice', 'vat_invoice', 'preliminary_invoice', 'preliminary_vat_invoice', 'credit_invoice', 'credit_vat_invoice' |
| `buyer` | object | No | Buyer object with customer information |
| `notes` | string | No | Optional notes to appear on the invoice |
| `seller` | object | No | Seller object if not using default |
| `series` | string | No | Series code/prefix for the invoice |
| `currency` | string | No | ISO 4217 three-letter currency code |
| `due_date` | string | No | Payment due date (alias). Format: YYYY-MM-DD |
| `products` | array | No | Products array with line items for the invoice |
| `invoice_id` | string | Yes | Unique identifier of the invoice to update |
| `invoice_date` | string | No | Date on the invoice. Format: YYYY-MM-DD |
| `pay_until_date` | string | No | Payment due date. Format: YYYY-MM-DD |
| `use_default_seller_info` | boolean | No | If true, API will use default seller info instead of requiring seller object |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Product

**Slug:** `FINMEI_UPDATE_PRODUCT`

Updates an existing product in the Finmei product catalog. Use this action when you need to modify product details such as name, description, price, or currency. You must provide the product ID and at least one field to update. The action returns the complete updated product details. Prerequisites: - The product must already exist in the system (obtain product_id from List Products action) - At least one update field (name, description, price, or currency) must be provided Note: This action will fail if the product doesn't exist or if the Finmei API instance doesn't support product management endpoints.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Updated name for the product. If provided, replaces the existing product name. |
| `price` | number | No | Updated price for the product in the specified currency. Must be non-negative. If provided, replaces the existing price. |
| `currency` | string | No | Updated currency code for the product price (ISO 4217 format, e.g., USD, EUR, GBP). If provided, replaces the existing currency. |
| `product_id` | string | Yes | Unique identifier of the product to update. Must be a valid existing product ID. |
| `description` | string | No | Updated description for the product. If provided, replaces the existing description. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
