create_transactions
Bulk create transactions in a single API call for efficient importing into YNAB, with support for split transactions and duplicate rejection.
Instructions
Create multiple transactions in a single API call. Ideal for bulk imports.
Future-dated transactions are not permitted. The response includes any duplicate_import_ids that were rejected because of an existing import_id on the same account.
Args: plan_id: The plan ID (use list_plans to find available IDs) account_id: Default account ID for all transactions transactions: List of transaction dicts, each with: - date: Transaction date in YYYY-MM-DD format (required) - amount: Amount in dollars (required, negative for outflow, positive for inflow) - account_id: (optional) Override the default account ID - payee_id: (optional) Payee ID - payee_name: (optional) Payee name (resolves to existing or creates a new payee) - category_id: (optional) Category ID. Use null with subtransactions for splits. - memo: (optional) Memo (max 500 chars) - cleared: (optional) 'cleared', 'uncleared', or 'reconciled' (default: 'uncleared') - approved: (optional) Whether the transaction is approved (default: false) - flag_color: (optional) 'red', 'orange', 'yellow', 'green', 'blue', 'purple', or null - import_id: (optional) Unique import identifier (max 36 chars) - subtransactions: (optional) For splits, a list of subtransaction dicts with: amount, payee_id, payee_name, category_id, memo exclude_fields: Optional list of field names to exclude from each created transaction. If omitted, the model's default exclude list is used (see FIELDS.md). Pass [] to return all fields. Pass a custom list to override the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | Yes | ||
| account_id | Yes | ||
| transactions | Yes | ||
| exclude_fields | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |